import pygame


class Beijing:
    """管理飞船的类"""

    def __init__(self, game):
        """初始化飞船并设置其初始位置"""
        self.screen = game.screen
        self.screen_rect = self.screen.get_rect()

        # 加载飞船图像并获取其外接矩形
        self.image_beijing = pygame.image.load('images/space.jpg')
        self.rect_beijing = self.image_beijing.get_rect()

        # 对于每艘新飞船，都将其放在屏幕底部的中央
        self.rect_beijing.center = self.screen_rect.center

    def blitme(self):
        """在指定位置绘制飞船"""
        self.screen.blit(self.image_beijing, self.rect_beijing)
